// import 'package:flutter/material.dart';
import 'package:flutter/material.dart';
//
// void main() {
//   runApp(MyHomePage());
// }
void main() =>runApp(MyHomeApp());

// Widget:
// 有状态的Widget：StatefulWidget 在运行过程中有一下状态（data）需要改变
// 无状态的widget：StatelessWidget 内容是确定没有状态（data）的改变
class MyHomeApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        debugShowCheckedModeBanner: false,
        home:MyHomePage()
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return  Scaffold(
      appBar: AppBar(
        title: Center(
          child: Text("第一flutter程序"),
        ),
      ),
      body: MyContentBody()
    );
  }
}

class MyContentBody extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return
      Center(
        child: Row(
          children: [
            Text('你好呀'),
            Text('hello')
          ],
        )
      );
  }
}
